package com.uk.data.ejbs;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import javax.ejb.Local;
import com.uk.data.entities.BashkiKomuna;
import com.uk.data.entities.Fatura;
import com.uk.data.entities.Kontrata;
import com.uk.data.entities.Parameters;
import com.uk.data.entities.Perdorimi;
import com.uk.data.entities.Qarku;
import com.uk.data.entities.Rrethi;
import com.uk.data.entities.StatusEnum;
import com.uk.data.entities.Tarifa;
import com.uk.data.entities.User;
import com.vaadin.data.util.BeanItem;

@Local
public interface IFaturaBean {


	public abstract List<Kontrata> queryKontrata(String property, Object value,
			int numberOfRows);

	public abstract List<Kontrata> queryKontrata(String emri, String mbiemri, int numberOfRows);

	public abstract List<Kontrata> queryLatestKontrata(int numberOfRows);


	public abstract List<Qarku> queryQarku();


	public abstract List<Rrethi> queryRrethi(Qarku qarku);


	public abstract List<BashkiKomuna> queryBashkiKomuna(Rrethi rrethi);


	public abstract List<Perdorimi> queryPerdorimi();

	public abstract Kontrata saveKontrata(Kontrata kontrata);

	public abstract List<Tarifa> queryTarifa(StatusEnum status);

	public abstract Tarifa saveTarifa(Tarifa tarifa, boolean saveOldRecord);
	
	public abstract boolean isTarifaCodeUnique(String kodi);
	
	public abstract void loadUser(String user);
	public abstract Tarifa queryTarifaById(Integer id);
	
	public abstract Double getAfrofe();
	
	public abstract List<Tarifa> queryTarifa(boolean neListe);
	
	public abstract Kontrata queryKontrata(Integer id);
	
	public abstract Fatura saveFatura(Fatura fatura);
	
	//public abstract List<Fatura> queryFatura();
	
	public abstract List<Parameters> getParameters();
	
	public abstract List<Fatura> queryLatestFatura(Kontrata kontrata, int maxResult);

	public abstract List<Fatura> queryFatura(Kontrata kontrata, Boolean paguar);
	
	public abstract List<Kontrata> findDebitor(Date ngaData, Date deriNe);
	
	public abstract List<Kontrata> listDebitor();
	public abstract int queryFaturainTotal(Kontrata kontrata, Boolean paguar);

	public abstract List<? extends User> queryUsers();

	public abstract User saveUser(User user);
	public abstract User updateUser(User user);

	public abstract User login(String username, String password);
	
	public abstract void postPersist(Object obj);
	
	public abstract List<Kontrata> listDebitor(Date fromDate, Date toDate);
	
	public abstract List<Kontrata> listKontrataPaFature(Date fromDate, Date toDate);
} 
